package com.wing.user.feign;


import com.wing.user.model.dingRequest.OapiV2DepartmentListsubRequest;
import com.wing.user.model.dingResponse.OapiV2DepartmentListsubResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * 调用用户中心中的userdetail对象，用户oauth中的登录
 * 获取的用户与页面输入的密码 进行BCryptPasswordEncoder匹配
 *
 * @author
 */
@Component
@FeignClient(name = "dingtalk-client", url = "https://oapi.dingtalk.com", configuration = {}, fallback = DingTalkClientFallback.class)
public interface DingTalkClient {


    @PostMapping(value = "/topapi/v2/department/listsub", params = "access_token")
    OapiV2DepartmentListsubResponse listSubDepartments(@RequestParam("access_token") String access_token, @RequestBody OapiV2DepartmentListsubRequest request) throws Exception;



}
